package com.qf.job;

import org.quartz.*;

import java.util.Date;

/*
 *@Description:
 *@author:刘哥
 *@Date:16:37 2022/7/15
 */
public class MyJob implements Job {

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
//        获取任务详情
        JobDetail jobDetail = jobExecutionContext.getJobDetail();

//        获取触发器对象
//        Trigger：触发器。可以指定给某个任务，指定任务的触发机制。
        Trigger trigger = jobExecutionContext.getTrigger();
        System.out.println("现在的时间是"+new Date());



    }
}
